package com.turing.post.thirdinterface.impl;

import javax.ejb.Local;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import com.turing.post.thirdinterface.util.MapMchTradDetail;
import com.turing.post.thirdinterface.util.MapMchTradDetailDao;
import com.turing.post.util.GeneralDao;
import com.turing.post.util.PCPSApplicationException;

@Stateless(mappedName = "thirdinterface.impl.MapMchTradDetailDaoImpl")
@Remote
@Local
public class MapMchTradDetailDaoImpl implements MapMchTradDetailDao {

	/**
	 * 实体管理器
	 */
	@PersistenceContext
	protected EntityManager _em;

	@Override
	public MapMchTradDetail getMapMchTradDetailByPk(MapMchTradDetail mmtd)
			throws PCPSApplicationException {
		return _em.find(MapMchTradDetail.class, mmtd);
	}

	@Override
	public void insertMapMchTradDetail(MapMchTradDetail mmtd)
			throws PCPSApplicationException {
		GeneralDao.insert(_em, mmtd);
	}

}
